package org.example.erp.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.example.erp.domain.NewSalesOrderItem;
import org.example.erp.service.NewSalesOrderItemService;
import org.example.erp.mapper.NewSalesOrderItemMapper;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author 28254
* @description 针对表【new_sales_order_item(销售订单产品列表)】的数据库操作Service实现
* @createDate 2024-12-02 15:18:33
*/
@Service
public class NewSalesOrderItemServiceImpl extends ServiceImpl<NewSalesOrderItemMapper, NewSalesOrderItem>
    implements NewSalesOrderItemService{

    //查询主订单表下面的所有子订单
    @Override
    public List<NewSalesOrderItem> SalesOrderItemById(Integer salesOrderId) {
        LambdaQueryWrapper<NewSalesOrderItem> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(NewSalesOrderItem::getSalesOrderId,salesOrderId);
        return this.list(queryWrapper);
    }
}




